﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Kaixin.Forms
{
    public partial class frmInputNumber : Form
    {
        public frmInputNumber()
        {
            InitializeComponent();

            nudNumber.Minimum = 0;
            nudNumber.Maximum = 200;
            nudNumber.Increment = 10;
            nudNumber.Value = 200;
        }

        public frmInputNumber(int min, int max, int inc, int value)
        {
            nudNumber.Minimum = min;
            nudNumber.Maximum = max;
            nudNumber.Increment = inc;
            nudNumber.Value = value;
        }

        public int GetValue()
        {
            return Convert.ToInt32(nudNumber.Value);
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
        }
    }
}
